import request from '@/utils/request'
const baseUrl = '/catalog'

export function reqTree() {
    return request({
        url: `${baseUrl}/tree`,
        method: 'get',
    })
}

export function reqBatchDelete(ids) {
    return request({
        url: `${baseUrl}/batchDel`,
        method: 'post',
        data: ids
    })
}

export function reqDelete(cid) {
    return request({
        url: `${baseUrl}/${cid}`,
        method: 'delete',
    })
}

export function reqAdd(data) {
    return request({
        url: `${baseUrl}/add`,
        method: 'post',
        data
    })
}

export function reqUpdateDrop(data) {
    return request({
        url: `${baseUrl}/updateDrop`,
        method: 'post',
        data: data
    })
}